#ifndef tafang_Event_h
#define tafang_Event_h

#include <string>
#include <map>
#include <vector>
using namespace std;

 

class TEventDistpacher;

class TEventHandel{
public:
    virtual void doEvent(string event,TEventDistpacher* dispath=NULL);
};

class TEventDistpacher{
public:
    
    void addEventListener(string event ,TEventHandel*);
    void removeEventListener(string event ,TEventHandel*);
    void dispatcherEvent(string event);
    
protected:
    std::map<string, vector<TEventHandel*> > handelMap;
};

#endif
